-- GENERATED SPELL FOR [Ethereum Prisoner (Group Energy Ball)] --


function spell0_20889(pUnit, Event) --@Boulder,n/a--
pUnit:FullCastSpellOnTarget(38765,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20889', 2000, 1)
end

function spell1_20889(pUnit, Event) --@Focused Bursts,n/a--
pUnit:FullCastSpellOnTarget(38985,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20889', 12000, 1)
end

function spell2_20889(pUnit, Event) --@Mark of Malice,n/a--
pUnit:FullCastSpellOnTarget(33493,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20889', 31000, 1)
end

function spell3_20889(pUnit, Event) --@Mighty Blow,n/a--
pUnit:FullCastSpellOnTarget(14099,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20889', 641, 1)
end

function spell4_20889(pUnit, Event) --@Mind Blast,n/a--
pUnit:FullCastSpellOnTarget(17194,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20889', 1500, 1)
end

function spell5_20889(pUnit, Event) --@Mortal Cleave,n/a--
pUnit:FullCastSpellOnTarget(22859,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20889', 5283, 1)
end

function spell6_20889(pUnit, Event) --@Mortal Wound,n/a--
pUnit:FullCastSpellOnTarget(38770,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20889', 20344, 1)
end

function spell7_20889(pUnit, Event) --@Psychic Scream,Self--
pUnit:FullCastSpellOnTarget(22884,pUnit)
pUnit:RegisterEvent('Sorts_20889', 4264, 1)
end

function spell8_20889(pUnit, Event) --@Rain of Fire,n/a--
pUnit:FullCastSpellOnTarget(38741,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20889', 9000, 1)
end

function spell9_20889(pUnit, Event) --@Rock Rumble,n/a--
pUnit:FullCastSpellOnTarget(38777,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20889', 563, 1)
end

function spell10_20889(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(15537,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20889', 3000, 1)
end

function spell11_20889(pUnit, Event) --@Shadow Nova,Self--
pUnit:FullCastSpellOnTarget(32711,pUnit)
pUnit:RegisterEvent('Sorts_20889', 580, 1)
end

function spell12_20889(pUnit, Event) --@Soul Chill,Self--
pUnit:FullCastSpellOnTarget(36786,pUnit)
pUnit:RegisterEvent('Sorts_20889', 8295, 1)
end

function spell13_20889(pUnit, Event) --@Soul Steal,n/a--
pUnit:FullCastSpellOnTarget(36778,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20889', 20315, 1)
end

function spell14_20889(pUnit, Event) --@Unholy Aura,Self--
pUnit:FullCastSpellOnTarget(17467,pUnit)
pUnit:RegisterEvent('Sorts_20889', 0, 1)
end

function spell15_20889(pUnit, Event) --@War Stomp,Self--
pUnit:FullCastSpellOnTarget(38750,pUnit)
pUnit:RegisterEvent('Sorts_20889', 5000, 1)
end

function spell16_20889(pUnit, Event) --@Whirlwind,n/a--
pUnit:FullCastSpellOnTarget(33238,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20889', 15000, 1)
end

function spell17_20889(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(33239,pUnit)
pUnit:RegisterEvent('Sorts_20889', 636, 1)
end

function Sorts_20889(pUnit, Event)
local choix_sorts_20889 = math.random(0, 17)
if choix_sorts_20889 == 0 then
pUnit:RegisterEvent('spell0_20889', 1, 1)
end
if choix_sorts_20889 == 1 then
pUnit:RegisterEvent('spell1_20889', 1, 1)
end
if choix_sorts_20889 == 2 then
pUnit:RegisterEvent('spell2_20889', 1, 1)
end
if choix_sorts_20889 == 3 then
pUnit:RegisterEvent('spell3_20889', 1, 1)
end
if choix_sorts_20889 == 4 then
pUnit:RegisterEvent('spell4_20889', 1, 1)
end
if choix_sorts_20889 == 5 then
pUnit:RegisterEvent('spell5_20889', 1, 1)
end
if choix_sorts_20889 == 6 then
pUnit:RegisterEvent('spell6_20889', 1, 1)
end
if choix_sorts_20889 == 7 then
pUnit:RegisterEvent('spell7_20889', 1, 1)
end
if choix_sorts_20889 == 8 then
pUnit:RegisterEvent('spell8_20889', 1, 1)
end
if choix_sorts_20889 == 9 then
pUnit:RegisterEvent('spell9_20889', 1, 1)
end
if choix_sorts_20889 == 10 then
pUnit:RegisterEvent('spell10_20889', 1, 1)
end
if choix_sorts_20889 == 11 then
pUnit:RegisterEvent('spell11_20889', 1, 1)
end
if choix_sorts_20889 == 12 then
pUnit:RegisterEvent('spell12_20889', 1, 1)
end
if choix_sorts_20889 == 13 then
pUnit:RegisterEvent('spell13_20889', 1, 1)
end
if choix_sorts_20889 == 14 then
pUnit:RegisterEvent('spell14_20889', 1, 1)
end
if choix_sorts_20889 == 15 then
pUnit:RegisterEvent('spell15_20889', 1, 1)
end
if choix_sorts_20889 == 16 then
pUnit:RegisterEvent('spell16_20889', 1, 1)
end
if choix_sorts_20889 == 17 then
pUnit:RegisterEvent('spell17_20889', 1, 1)
end
end

function mob20889_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20889', math.random(1500, 3000), 1)
end

function mob20889_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20889_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20889_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20889, 1, 'mob20889_Action')
RegisterUnitEvent(20889, 2, 'mob20889_Leave')
RegisterUnitEvent(20889, 3, 'mob20889_Kill')
RegisterUnitEvent(20889, 4, 'mob20889_Die')
